// house_pkg/pages/building/index.ts
Page({

  /**
   * 页面的初始数据
   */
  data: {
    point:'',//存储小区名称
    type:'',//4-5号楼，6-7单元
    size:0,//数量4-7
  },

  onLoad({point}){
    this.fakeData(point)
  },
  fakeData(point){
    const size = Math.floor(Math.random() * 4) + 4
    const type = size > 5 ? '单元' : '号楼'
    this.setData({
      point,
      type,
      size
    })
  },
  goRoom(e){
    wx.navigateTo({
      url: `/house_pkg/pages/room/index?point=${this.data.point}&building=${e.mark.building}`,
    })
  }
})